package aufgabe1;

/**
* definition of a Student-object
* @author Lukas Koell
* @author David Medenjak
* @author Johannes Riedmann
*/
public class Student {
	/** Matrikel-Number of the student */
   private int matrikelNr;
   /** name of the student */
   private String name;
   
   public Student(int matrikelNr, String name){
       this.matrikelNr = matrikelNr;
       this.name = name;
   }
   
   /**
    * getter-method for name
    * @return name of a student
    */
   public String getName(){
       return name;
   }
   
   /**
    * getter-method for MatrikelNr
    * @return MatrikelNr of a student
    */
   public int getMatrikelNr(){
       return matrikelNr;
   }
   
   /**
    * defines toString-Method for Student-objects
    * @return formated representation of a Student-object
    */
   public String toString() {
    return this.getMatrikelNr() + ": " + this.getName() + "\n";
  }
}
